package com.xzbd.springbootmybatiesdm.controller;

import com.xzbd.springbootmybatiesdm.common.response.R;
import com.xzbd.springbootmybatiesdm.config.TestConfig;
import com.xzbd.springbootmybatiesdm.config.Work;
import com.xzbd.springbootmybatiesdm.domain.Event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorld{

    @Autowired
    private TestConfig testConfig;

    @Autowired
    private Work work;

    @GetMapping("say")
    public  String kayHello() {
        return "hello , you are succesed";
    }
    @GetMapping("test-user")
    public R testUser(){
        R r = R.dataOk("work", work.toString());
        r.put("testConfig", testConfig.toString());
        return r;
    }

}